<template>
  <nav class="bg-gray-800 text-white p-4">
    <div class="container mx-auto flex justify-between items-center">
      <router-link to="/" class="text-xl font-bold">购物商城</router-link>
      <div class="flex space-x-4">
        <router-link to="/products">商品列表</router-link>
        <router-link to="/cart" class="flex items-center">
          购物车 ({{ cartStore.totalItems }})
        </router-link>
      </div>
    </div>
  </nav>
</template>

<script setup>
import { useCartStore } from '../store/cartStore'

const cartStore = useCartStore()
</script> 